package com.dj.providerdept8001.controller;


import com.dj.common.Result;
import com.dj.providerdept8001.entity.Dept;
import com.dj.providerdept8001.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author DJ同学
 * @since 2020-12-01
 */
@RestController
@RequestMapping("/providerdept8001/dept")
public class DeptController {
    @Autowired
    private DeptService deptService;
    @GetMapping("/getAll")
    public Result getAll(){
        List<Dept> list = deptService.list(null);
        return Result.ok().data("list",list);
    }

}

